package com.roc.steelend.controller;


import com.roc.steelend.pojo.Unit;
import com.roc.steelend.service.UnitService;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@CrossOrigin
@Api(tags = "计量单位功能接口")
@RestController
public class UnitController {

    @Autowired
    private UnitService unitService;

    @GetMapping("/v1/unit")
    public List<Unit> findAllUnit(){
        return  unitService.findAllUnit();
    }
}
